home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload Trio 2
/
Shareware Overload Trio Volume 2 (Chestnut CD-ROM).ISO
/
dir31
/
sndblst3.zip
/
RAWIN.C
next >
Wrap
Text File
|
1993-10-25
|
1KB
|
44 lines
//------------------------------------------------------------------------------
// Copyright (c) David Welch, 1993
//------------------------------------------------------------------------------
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "..\sb.h"
unsigned char ca;
unsigned short ra;
unsigned long la;
FILE *fp;
unsigned char gstring[80];
unsigned long dLen;
void main ( int argc, char *argv[] )
{
if(argc<3)
{
printf("filename and/or sample rate not specified\n");
exit(1);
}
if((fp=fopen(argv[1],"wb"))==0)
{
printf("Error creating file [%s]\n",argv[1]);
exit(1);
}
printf("FILE: [%s]\n",argv[1]);
sbsetup();
ra=atoi(argv[2]);
printf("Samples Per Second %u\n",ra);
ca=256UL-(1000000UL/ra);
printf("Time Constant %u\n",ca);
sbsettc(ca);
sbrec(65000);
printf("Recording 65000 samples\n");
while(dmacount()!=0xFFFF);
fwrite(aligned,1,65000,fp);
}
//------------------------------------------------------------------------------
// Copyright (c) David Welch, 1993
//------------------------------------------------------------------------------